package src.model.entity;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "ACTOR", schema = "HB")
@SequenceGenerator(name = "SEQ_GEN", sequenceName = "ACT_SEQ", initialValue = 1, allocationSize = 1)
public class Actors extends abstractEntity {

	private String ActorName;
	private Set<Movies> moviess;
	
	@Column(name="ACTORNAME",unique=true)
	public String getActorName() {
		return ActorName;
	}

	public void setActorName(String actorName) {
		ActorName = actorName;
	}
	
	@OneToMany(mappedBy="actors")
	public Set<Movies> getMoviess() {
		return moviess;
	}

	public void setMoviess(Set<Movies> moviess) {
		this.moviess = moviess;
	}

	@Override
	public String toString() {
		return "Actors [ActorName=" + ActorName + "]";
	}
}
